home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / GNU / emacs.inst / emacs19.idb / usr / gnu / info / emacs-13.z / emacs-13
Encoding:
GNU Info File  |  1994-08-02  |  47.6 KB  |  1,176 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.54 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Rmail Inbox,  Next: Rmail Files,  Prev: Rmail Deletion,  Up: Rmail
  6.  
  7. Rmail Files and Inboxes
  8. =======================
  9.  
  10.    Unix places incoming mail for you in a file that we call your
  11. "inbox".  When you start up Rmail, it copies the new messages from your
  12. inbox into your primary mail file, an Rmail file, which also contains
  13. other messages saved from previous Rmail sessions.  It is in this file
  14. that you actually read the mail with Rmail.  This operation is called
  15. "getting new mail".  It can be repeated at any time using the `g' key
  16. in Rmail.  The inbox file name is `/usr/spool/mail/USERNAME' on some
  17. systems (typically Berkeley-derived ones) and `/usr/mail/USERNAME' on
  18. other systems.
  19.  
  20.    There are three reason for having separate Rmail files and inboxes.
  21.  
  22.   1. The inbox file format varies between operating systems and
  23.      according to the other mail software in use.  Only one part of
  24.      Rmail needs to know about the alternatives, and it need only
  25.      understand how to convert all of them to Rmail's own format.
  26.  
  27.   2. The inbox file format usually doesn't provide a place for all the
  28.      information that Rmail records.
  29.  
  30.   3. It is very cumbersome to access an inbox file without danger of
  31.      losing mail, because it is necessary to interlock with mail
  32.      delivery.  Moreover, different operating systems use different
  33.      interlocking techniques.  The strategy of moving mail out of the
  34.      inbox once and for all into a separate Rmail file avoids the need
  35.      for interlocking in all the rest of Rmail, since only Rmail
  36.      operates on the Rmail file.
  37.  
  38.    When getting new mail, Rmail first copies the new mail from the inbox
  39. file to the Rmail file; then it saves the Rmail file; then it truncates
  40. the inbox file.  This way, a system crash may cause duplication of mail
  41. between the inbox and the Rmail file, but cannot lose mail.
  42.  
  43.    Copying mail from an inbox in the system's mailer directory actually
  44. puts it in an intermediate file `~/.newmail'.  This is because the
  45. interlocking is done by a C program that copies to another file.
  46. `~/.newmail' is deleted after mail merging is successful.  If there is
  47. a crash at the wrong time, this file continues to exist and will be
  48. used as an inbox the next time you get new mail.
  49.  
  50. 
  51. File: emacs,  Node: Rmail Files,  Next: Rmail Output,  Prev: Rmail Inbox,  Up: Rmail
  52.  
  53. Multiple Mail Files
  54. ===================
  55.  
  56.    Rmail operates by default on your "primary mail file", which is named
  57. `~/RMAIL' and receives your incoming mail from your system inbox file.
  58. But you can also have other mail files and edit them with Rmail.  These
  59. files can receive mail through their own inboxes, or you can move
  60. messages into them with explicit Rmail commands (*note Rmail Output::.).
  61.  
  62. `i FILE RET'
  63.      Read FILE into Emacs and run Rmail on it (`rmail-input').
  64.  
  65. `M-x set-rmail-inbox-list RET FILES RET'
  66.      Specify inbox file names for current Rmail file to get mail from.
  67.  
  68. `g'
  69.      Merge new mail from current Rmail file's inboxes
  70.      (`rmail-get-new-mail').
  71.  
  72. `C-u g FILE RET'
  73.      Merge new mail from inbox file FILE.
  74.  
  75.    To run Rmail on a file other than your primary mail file, you may use
  76. the `i' (`rmail-input') command in Rmail.  This visits the file, puts
  77. it in Rmail mode, and then gets new mail from the file's inboxes if
  78. any.  The file should be in Rmail format.  You can use `M-x
  79. rmail-input' even when not in Rmail.
  80.  
  81.    The file you read with `i' should usually be a valid Rmail file.  If
  82. it is not, then Rmail tries to decompose it into a stream of messages
  83. in various known formats.  If it succeeds, it converts the whole file to
  84. an Rmail file.
  85.  
  86.    Each Rmail file can contain a list of inbox file names; you can
  87. specify this list with `M-x set-rmail-inbox-list RET FILES RET'.  The
  88. argument can contain any number of file names, separated by commas.  It
  89. can also be empty, which specifies that this file should have no
  90. inboxes.  Once a list of inboxes is specified, the Rmail file remembers
  91. it permanently until it is explicitly changed.
  92.  
  93.    If an Rmail file has inboxes, new mail is merged in from the inboxes
  94. when the Rmail file is brought into Rmail, and when you use the `g'
  95. (`rmail-get-new-mail') command.  If the Rmail file specifies no
  96. inboxes, then no new mail is merged in at these times.  As a special
  97. exception, if your primary mail file does not specify any inbox files,
  98. it uses the standard system inbox.
  99.  
  100.    To merge mail from a file that is not the usual inbox, give the `g'
  101. key a numeric argument, as in `C-u g'.  Then it reads a file name and
  102. merges mail from that file.  The inbox file is not deleted or changed
  103. in any way when `g' with an argument is used.  This is, therefore, a
  104. general way of merging one file of messages into another.
  105.  
  106. 
  107. File: emacs,  Node: Rmail Output,  Next: Rmail Labels,  Prev: Rmail Files,  Up: Rmail
  108.  
  109. Copying Messages Out to Files
  110. =============================
  111.  
  112. `o FILE RET'
  113.      Append a copy of the current message to the file FILE, writing it
  114.      in Rmail file format by default (`rmail-output-to-rmail-file').
  115.  
  116. `C-o FILE RET'
  117.      Append a copy of the current message to the file FILE, writing it
  118.      in Unix mail file format by default (`rmail-output').
  119.  
  120.    If an Rmail file has no inboxes, the only way messages get into it is
  121. by means of explicit `o' commands.
  122.  
  123.    `o' (`rmail-output-to-rmail-file') appends the current message in
  124. Rmail format to the end of the specified file.  This is the best command
  125. to use to move messages between Rmail files.  If the other Rmail file is
  126. currently visited, the copying is done into the other file's Emacs
  127. buffer instead.  You should eventually save it on disk.
  128.  
  129.    The `C-o' (`rmail-output') command in Rmail appends a copy of the
  130. current message to a specified file, in inbox file format.  This is
  131. useful for moving messages into files to be read by other mail
  132. processors that do not understand Rmail format.
  133.  
  134.    The `o' and `C-o' commands are actually equivalent (aside from
  135. having separate file name defaults) when you specify an existing file;
  136. both commands check the file's contents to determine which format to use
  137. (Rmail or inbox).  But it does matter which command you use when you
  138. specify a nonexistent file; `o' starts it in Rmail format, while `C-o'
  139. starts it in inbox format.
  140.  
  141.    Copying a message with `o' or `C-o' gives the original copy of the
  142. message the `filed' attribute, so that `filed' appears in the mode line
  143. when such a message is current.  If you like to keep just a single copy
  144. of every mail message, set the variable `rmail-delete-after-output' to
  145. `t'; then the `o' and `C-o' commands delete the original message after
  146. copying it.  (You can undelete the original afterward.)
  147.  
  148.    Copying messages in Unix format copies the header fields that are
  149. displayed in Rmail at the time.  Thus, if you use the `t' command to
  150. view the entire header and then copy the message, the entire header is
  151. copied.
  152.  
  153.    The variable `rmail-output-file-alist' lets you specify intelligent
  154. defaults for the output file, based on the contents of the current
  155. message.  The value should be a list whose elements have this form:
  156.  
  157.      (REGEXP . FILENAME)
  158.  
  159. If there's a match for REGEXP in the current message, then the default
  160. file name for output is FILENAME.  If multiple elements match the
  161. message, the first matching element decides the default file name.
  162.  
  163. 
  164. File: emacs,  Node: Rmail Labels,  Next: Rmail Reply,  Prev: Rmail Output,  Up: Rmail
  165.  
  166. Labels
  167. ======
  168.  
  169.    Each message can have various "labels" assigned to it as a means of
  170. classification.  A label has a name; different names mean different
  171. labels.  Any given label is either present or absent on a particular
  172. message.  A few label names have standard meanings and are given to
  173. messages automatically by Rmail when appropriate; these special labels
  174. are called "attributes".  All other labels are assigned only by users.
  175.  
  176. `a LABEL RET'
  177.      Assign the label LABEL to the current message (`rmail-add-label').
  178.  
  179. `k LABEL RET'
  180.      Remove the label LABEL from the current message
  181.      (`rmail-kill-label').
  182.  
  183. `C-M-n LABELS RET'
  184.      Move to the next message that has one of the labels LABELS
  185.      (`rmail-next-labeled-message').
  186.  
  187. `C-M-p LABELS RET'
  188.      Move to the previous message that has one of the labels LABELS
  189.      (`rmail-previous-labeled-message').
  190.  
  191. `C-M-l LABELS RET'
  192.      Make a summary of all messages containing any of the labels LABELS
  193.      (`rmail-summary-by-labels').
  194.  
  195. Specifying an empty string for one these commands means to use the last
  196. label specified for any of these commands.
  197.  
  198.    The `a' (`rmail-add-label') and `k' (`rmail-kill-label') commands
  199. allow you to assign or remove any label on the current message.  If the
  200. LABEL argument is empty, it means to assign or remove the same label
  201. most recently assigned or removed.
  202.  
  203.    Once you have given messages labels to classify them as you wish,
  204. there are two ways to use the labels: in moving and in summaries.
  205.  
  206.    The command `C-M-n LABELS RET' (`rmail-next-labeled-message') moves
  207. to the next message that has one of the labels LABELS.  The argument
  208. LABELS specifies one or more label names, separated by commas.  `C-M-p'
  209. (`rmail-previous-labeled-message') is similar, but moves backwards to
  210. previous messages.  A preceding numeric argument to either one serves
  211. as a repeat count.
  212.  
  213.    The command `C-M-l LABELS RET' (`rmail-summary-by-labels') displays
  214. a summary containing only the messages that have at least one of a
  215. specified set of messages.  The argument LABELS is one or more label
  216. names, separated by commas.  *Note Rmail Summary::, for information on
  217. summaries.
  218.  
  219.    If the LABELS argument to `C-M-n', `C-M-p' or `C-M-l' is empty, it
  220. means to use the last set of labels specified for any of these commands.
  221.  
  222.    Some labels such as `deleted' and `filed' have built-in meanings and
  223. are assigned to or removed from messages automatically at appropriate
  224. times; these labels are called "attributes".  Here is a list of Rmail
  225. attributes:
  226.  
  227. `unseen'
  228.      Means the message has never been current.  Assigned to messages
  229.      when they come from an inbox file, and removed when a message is
  230.      made current.  When you start Rmail, it initially shows the first
  231.      message that has this attribute.
  232.  
  233. `deleted'
  234.      Means the message is deleted.  Assigned by deletion commands and
  235.      removed by undeletion commands (*note Rmail Deletion::.).
  236.  
  237. `filed'
  238.      Means the message has been copied to some other file.  Assigned by
  239.      the file output commands (*note Rmail Files::.).
  240.  
  241. `answered'
  242.      Means you have mailed an answer to the message.  Assigned by the
  243.      `r' command (`rmail-reply').  *Note Rmail Reply::.
  244.  
  245. `forwarded'
  246.      Means you have forwarded the message to other users.  Assigned by
  247.      the `f' command (`rmail-forward').  *Note Rmail Reply::.
  248.  
  249. `edited'
  250.      Means you have edited the text of the message within Rmail.  *Note
  251.      Rmail Editing::.
  252.  
  253. `resent'
  254.      Means you have resent the message to other users.  Assigned by the
  255.      command `M-x rmail-resend'.  *Note Rmail Reply::.
  256.  
  257.    All other labels are assigned or removed only by the user, and have
  258. no standard meaning.
  259.  
  260. 
  261. File: emacs,  Node: Rmail Reply,  Next: Rmail Summary,  Prev: Rmail Labels,  Up: Rmail
  262.  
  263. Sending Replies
  264. ===============
  265.  
  266.    Rmail has several commands that use Mail mode to send outgoing mail.
  267. *Note Sending Mail::, for information on using Mail mode.  What are
  268. documented here are the special commands of Rmail for entering Mail
  269. mode.  Note that the usual keys for sending mail, `C-x m' and `C-x 4 m',
  270. are available in Rmail mode and work just as they usually do.
  271.  
  272. `m'
  273.      Send a message (`rmail-mail').
  274.  
  275. `c'
  276.      Continue editing already started outgoing message
  277.      (`rmail-continue').
  278.  
  279. `r'
  280.      Send a reply to the current Rmail message (`rmail-reply').
  281.  
  282. `f'
  283.      Forward current message to other users (`rmail-forward').
  284.  
  285. `C-u f'
  286.      Resend the current message to other users (`rmail-resend').
  287.  
  288. `M-m'
  289.      Try sending a bounced message a second time
  290.      (`rmail-retry-failure').
  291.  
  292.    The most common reason to send a message while in Rmail is to reply
  293. to the message you are reading.  To do this, type `r' (`rmail-reply').
  294. This displays the `*mail*' buffer in another window, much like `C-x 4
  295. m', but preinitializes the `Subject', `To', `CC' and `In-reply-to'
  296. header fields based on the message you are replying to.  The `To' field
  297. is starts out as the address of the person who sent the message you
  298. received, and the `CC' field starts out with all the other recipients
  299. of that message.
  300.  
  301.    You can exclude certain recipients from being placed automatically in
  302. the `CC', using the variable `rmail-dont-reply-to-names'.  Its value
  303. should be a regular expression (as a string); any recipient that the
  304. regular expression matches, is excluded from the `CC' field.  The
  305. default value matches your own name, and any name starting with
  306. `info-'.  (Those names are excluded because there is a convention of
  307. using them for large mailing lists to broadcast announcements.)
  308.  
  309.    To omit the `CC' field completely for a particular reply, enter the
  310. reply command with a prefix argument: `C-u r'.
  311.  
  312.    Once the `*mail*' buffer has been initialized, editing and sending
  313. the mail goes as usual (*note Sending Mail::.).  You can edit the
  314. presupplied header fields if they are not right for you.  You can also
  315. use the commands of Mail mode, including `C-c C-y' to yank in the
  316. message that you are replying to, and `C-c C-q' to fill what was thus
  317. yanked.  You can also switch to the Rmail buffer, select a different
  318. message, switch back, and yank the new current message.
  319.  
  320.    Sometimes a message does not reach its destination.  Mailers usually
  321. send the failed message back to you, enclosed in a "failure message".
  322. The Rmail command `M-m' (`rmail-retry-failure') prepares to send the
  323. same message a second time: it sets up a `*mail*' buffer with the same
  324. text and header fields as before.  If you type `C-c C-c' right away,
  325. you send the message again exactly the same as the first time.
  326. Alternatively, you can edit the text or headers and then send it.
  327.  
  328.    Another frequent reason to send mail in Rmail is to "forward" the
  329. current message to other users.  `f' (`rmail-forward') makes this easy
  330. by preinitializing the `*mail*' buffer with the current message as the
  331. text, and a subject designating a forwarded message.  All you have to
  332. do is fill in the recipients and send.  When you forward a message,
  333. recipients get a message which is "from" you, and which has the
  334. original message in its contents.
  335.  
  336.    "Resending" is an alternative similar to forwarding; the difference
  337. is that resending sends a message that is "from" the original sender,
  338. just as it reached you--with a few added header fields `Resent-from'
  339. and `Resent-to' to indicate that it came via you.  To resend a message
  340. in Rmail, use `C-u f'.  (`f' runs `rmail-forward', which is programmed
  341. to invoke `rmail-resend' if you provide a numeric argument.)
  342.  
  343.    The `m' (`rmail-mail') command is used to start editing an outgoing
  344. message that is not a reply.  It leaves the header fields empty.  Its
  345. only difference from `C-x 4 m' is that it makes the Rmail buffer
  346. accessible for `C-c C-y', just as `r' does.  Thus, `m' can be used to
  347. reply to or forward a message; it can do anything `r' or `f' can do.
  348.  
  349.    The `c' (`rmail-continue') command resumes editing the `*mail*'
  350. buffer, to finish editing an outgoing message you were already
  351. composing, or to alter a message you have sent.
  352.  
  353.    If you set the variable `rmail-mail-new-frame' to a non-`nil' value,
  354. then all the Rmail commands to start sending a message create a new
  355. frame to edit it in.  This frame is deleted when you send the message,
  356. or when you use the `Don't Send' item in the `Mail' menu.
  357.  
  358. 
  359. File: emacs,  Node: Rmail Summary,  Next: Rmail Editing,  Prev: Rmail Reply,  Up: Rmail
  360.  
  361. Summaries
  362. =========
  363.  
  364.    A "summary" is a buffer containing one line per message to give you
  365. an overview of the mail in an Rmail file.  Each line shows the message
  366. number, the sender, the labels, and the subject.  When the summary
  367. buffer is selected, you can use almost all Rmail commands; these apply
  368. to the message described by the current line of the summary.  Moving
  369. point in the summary buffer selects messages as you move to their
  370. summary lines.
  371.  
  372.    A summary buffer applies to a single Rmail file only; if you are
  373. editing multiple Rmail files, each one has its own summary buffer (if
  374. you have asked for one).  The summary buffer name is made by appending
  375. `-summary' to the Rmail buffer's name.  Normally only one summary
  376. buffer is displayed at a time.
  377.  
  378. * Menu:
  379.  
  380. * Rmail Make Summary::  Making various sorts of summaries.
  381. * Rmail Summary Edit::  Manipulating messages from the summary.
  382.  
  383. 
  384. File: emacs,  Node: Rmail Make Summary,  Next: Rmail Summary Edit,  Up: Rmail Summary
  385.  
  386. Making Summaries
  387. ----------------
  388.  
  389.    Here are the commands to create a summary for the current Rmail file.
  390. Once the Rmail file has a summary buffer, changes in the Rmail file
  391. (such as deleting or expunging messages, and getting new mail)
  392. automatically update the summary.
  393.  
  394. `h'
  395. `C-M-h'
  396.      Summarize all messages (`rmail-summary').
  397.  
  398. `l LABELS RET'
  399. `C-M-l LABELS RET'
  400.      Summarize message that have one or more of the specified labels
  401.      (`rmail-summary-by-labels').
  402.  
  403. `C-M-r RCPTS RET'
  404.      Summarize messages that have one or more of the specified
  405.      recipients (`rmail-summary-by-recipients').
  406.  
  407. `C-M-t TOPIC RET'
  408.      Summarize messages that have a match for the specified regexp
  409.      TOPIC in their subjects (`rmail-summary-by-topic').
  410.  
  411.    The `h' or `C-M-h' (`rmail-summary') command fills the summary buffer
  412. for the current Rmail file with a summary of all the messages in the
  413. file.  It then displays and selects the summary buffer in another
  414. window.
  415.  
  416.    `C-M-l LABELS RET' (`rmail-summary-by-labels') makes a partial
  417. summary mentioning only the messages that have one or more of the
  418. labels LABELS.  LABELS should contain label names separated by commas.
  419.  
  420.    `C-M-r RCPTS RET' (`rmail-summary-by-recipients') makes a partial
  421. summary mentioning only the messages that have one or more of the
  422. recipients RCPTS.  RCPTS should contain mailing addresses separated by
  423. commas.
  424.  
  425.    `C-M-t TOPIC RET' (`rmail-summary-by-topic') makes a partial summary
  426. mentioning only the messages whose subjects have a match for the
  427. regular expression TOPIC.
  428.  
  429.    Note that there is only one summary buffer for any Rmail file;
  430. making one kind of summary discards any previously made summary.
  431.  
  432. 
  433. File: emacs,  Node: Rmail Summary Edit,  Prev: Rmail Make Summary,  Up: Rmail Summary
  434.  
  435. Editing in Summaries
  436. --------------------
  437.  
  438.    You can use the Rmail summary buffer to do almost anything you can do
  439. in the Rmail buffer itself.  In fact, once you have a summary buffer,
  440. there's no need to switch back to the Rmail buffer.
  441.  
  442.    You can select and display various messages in the Rmail buffer, from
  443. the summary buffer, just by moving point in the summary buffer to
  444. different lines.  It doesn't matter what Emacs command you use to move
  445. point; whichever line point is on at the end of the command, that
  446. message is selected in the Rmail buffer.
  447.  
  448.    Almost all Rmail commands work in the summary buffer as well as in
  449. the Rmail buffer.  Thus, `d' in the summary buffer deletes the current
  450. message, `u' undeletes, and `x' expunges.  `o' and `C-o' output the
  451. current message to a file; `r' starts a reply to it.  You can scroll
  452. the current message while remaining in the summary buffer using SPC and
  453. DEL.
  454.  
  455.    The Rmail commands to move between messages also work in the summary
  456. buffer, but with a twist: they move through the set of messages included
  457. in the summary.  They also redisplay the Rmail buffer on the screen
  458. (unlike cursor motion commands, which update the contents of the Rmail
  459. buffer but don't display it in a window unless it already appears).
  460. Here is a list of these commands:
  461.  
  462. `n'
  463.      Move to next line, skipping lines saying `deleted', and select its
  464.      message.
  465.  
  466. `p'
  467.      Move to previous line, skipping lines saying `deleted', and select
  468.      its message.
  469.  
  470. `M-n'
  471.      Move to next line and select its message.
  472.  
  473. `M-p'
  474.      Move to previous line and select its message.
  475.  
  476. `>'
  477.      Move to the last line, and select its message.
  478.  
  479. `<'
  480.      Move to the first line, and select its message.
  481.  
  482. `M-s PATTERN RET'
  483.      Search through messages for PATTERN starting with the current
  484.      message; select the message found, and move point in the summary
  485.      buffer to that message's line.
  486.  
  487.    Deletion, undeletion, and getting new mail, and even selection of a
  488. different message all update the summary buffer when you do them in the
  489. Rmail buffer.  If the variable `rmail-redisplay-summary' is non-`nil',
  490. these actions also bring the summary buffer back onto the screen.
  491.  
  492.    When you are finished using the summary, type `w'
  493. (`rmail-summary-wipe') to kill the summary buffer's window.  You can
  494. also exit Rmail while in the summary.  `q' (`rmail-summary-quit') kills
  495. the summary window, then saves the Rmail file and switches to another
  496. buffer.
  497.  
  498. 
  499. File: emacs,  Node: Rmail Editing,  Next: Rmail Digest,  Prev: Rmail Summary,  Up: Rmail
  500.  
  501. Editing Within a Message
  502. ========================
  503.  
  504.    Rmail mode provides a few special commands for moving within and
  505. editing the current message.  In addition, the usual Emacs commands are
  506. available (except for a few, such as `C-M-n' and `C-M-h', that are
  507. redefined by Rmail for other purposes).  However, the Rmail buffer is
  508. normally read-only, and to alter it you must use the Rmail command `e'
  509. described below.
  510.  
  511. `t'
  512.      Toggle display of original headers (`rmail-toggle-headers').
  513.  
  514. `e'
  515.      Edit current message (`rmail-edit-current-message').
  516.  
  517.    Rmail reformats the header of each message before displaying it.
  518. Normally this involves deleting most header fields, on the grounds that
  519. they are not interesting.  The variable `rmail-ignored-headers'
  520. specifies a regexp that matches the header fields to discard in this
  521. way.  The original headers are saved permanently, and to see what they
  522. look like, use the `t' command (`rmail-toggle-headers').  This discards
  523. the reformatted headers of the current message and displays it with the
  524. original headers.  Repeating `t' reformats the message again.
  525. Selecting the message again also reformats.
  526.  
  527.    The Rmail buffer is normally read only, and most of the characters
  528. you would type to modify it (including most letters) are redefined as
  529. Rmail commands.  This is usually not a problem since it is rare to want
  530. to change the text of a message.  When you do want to do this, the way
  531. is to type `e' (`rmail-edit-current-message'), which changes from Rmail
  532. mode into Rmail Edit mode, another major mode which is nearly the same
  533. as Text mode.  The mode line indicates this change.
  534.  
  535.    In Rmail Edit mode, letters insert themselves as usual and the Rmail
  536. commands are not available.  When you are finished editing the message
  537. and are ready to go back to Rmail, type `C-c C-c', which switches back
  538. to Rmail mode.  Alternatively, you can return to Rmail mode but cancel
  539. all the editing that you have done by typing `C-c C-]'.
  540.  
  541.    Entering Rmail Edit mode runs the hook `text-mode-hook'; then it
  542. runs the hook `rmail-edit-mode-hook' (*note Hooks::.).  It adds the
  543. attribute `edited' to the message.
  544.  
  545. 
  546. File: emacs,  Node: Rmail Digest,  Next: Out of Rmail,  Prev: Rmail Editing,  Up: Rmail
  547.  
  548. Digest Messages
  549. ===============
  550.  
  551.    A "digest message" is a message which exists to contain and carry
  552. several other messages.  Digests are used on some moderated mailing
  553. lists; all the messages that arrive for the list during a period of time
  554. such as one day are put inside a single digest which is then sent to the
  555. subscribers.  Transmitting the single digest uses much less computer
  556. time than transmitting the individual messages even though the total
  557. size is the same, because the per-message overhead in network mail
  558. transmission is considerable.
  559.  
  560.    When you receive a digest message, the most convenient way to read
  561. it is to "undigestify" it: to turn it back into many individual
  562. messages.  Then you can read and delete the individual messages as it
  563. suits you.
  564.  
  565.    To do this, type `M-x undigestify-rmail-message' after selecting the
  566. digest message.  This extracts the submessages as separate Rmail
  567. messages, and inserts them following the digest.  The digest message
  568. itself is flagged as deleted.
  569.  
  570. 
  571. File: emacs,  Node: Out of Rmail,  Next: Rmail Rot13,  Prev: Rmail Digest,  Up: Rmail
  572.  
  573. Converting an Rmail File to Mailbox Format
  574. ==========================================
  575.  
  576.    The command `M-x unrmail' converts a file in Rmail format to
  577. ordinary system mailbox format, so that you can use it with other
  578. mail-editing tools.  You must specify two arguments, the name of the
  579. Rmail file and the name to use for the converted file.  `M-x unrmail'
  580. does not alter the Rmail file itself.
  581.  
  582. 
  583. File: emacs,  Node: Rmail Rot13,  Prev: Out of Rmail,  Up: Rmail
  584.  
  585. Reading Rot13 Messages
  586. ======================
  587.  
  588.    Mailing list messages that might offend some readers are sometimes
  589. encoded in a simple code called "rot13"--so named because it rotates
  590. the alphabet by 13 letters.  This code is not for secrecy, as it
  591. provides none; rather, it enables those who might be offended to avoid
  592. ever seeing the real text of the message.
  593.  
  594.    To view a buffer using the rot13 code, use the command `M-x
  595. rot13-other-window'.  This displays the current buffer in another window
  596. which applies the code when displaying the text.
  597.  
  598. 
  599. File: emacs,  Node: Dired,  Next: Calendar/Diary,  Prev: Rmail,  Up: Top
  600.  
  601. Dired, the Directory Editor
  602. ***************************
  603.  
  604.    Dired makes an Emacs buffer containing a listing of a directory, and
  605. optionally some of its subdirectories as well.  You can use the normal
  606. Emacs commands to move around in this buffer, and special Dired commands
  607. to operate on the files listed.
  608.  
  609. * Menu:
  610.  
  611. * Enter: Dired Enter.         How to invoke Dired.
  612. * Commands: Dired Commands.   Commands in the Dired buffer.
  613. * Deletion: Dired Deletion.   Deleting files with Dired.
  614. * Visit: Dired Visiting.      Other file operations through Dired.
  615. * Marks vs Flags::          Flagging for deletion vs marking.
  616. * Operating on Files::          How to copy, rename, print, compress, etc.
  617.                     either one file or several files.
  618. * Shell Commands in Dired::   Running a shell command on the marked files.
  619. * Transforming File Names::   Using patterns to rename multiple files.
  620. * Comparison in Dired::          Running `diff' by way of Dired.
  621. * Subdirectories in Dired::   Adding subdirectories to the Dired buffer.
  622. * Subdirectory Motion::          Moving across subdirectories, and up and down.
  623. * Hiding Subdirectories::     Making subdirectories visible or invisible.
  624. * Updating: Dired Updating.   Discarding lines for files of no interest.
  625. * Find: Dired and Find.          Using `find' to choose the files for Dired.
  626.  
  627. 
  628. File: emacs,  Node: Dired Enter,  Next: Dired Commands,  Up: Dired
  629.  
  630. Entering Dired
  631. ==============
  632.  
  633.    To invoke Dired, do `C-x d' or `M-x dired'.  The command reads a
  634. directory name or wildcard file name pattern as a minibuffer argument
  635. to specify which files to list.  Where `dired' differs from
  636. `list-directory' is in putting the buffer into Dired mode so that the
  637. special commands of Dired are available.
  638.  
  639.    The variable `dired-listing-switches' specifies the options to give
  640. to `ls' for listing directory; this string *must* contain `-l'.  If you
  641. use a numeric prefix argument with the `dired' command, you can specify
  642. the `ls' switches with the minibuffer after you finish entering the
  643. directory specification.
  644.  
  645.    To display the Dired buffer in another window rather than in the
  646. selected window, use `C-x 4 d' (`dired-other-window)' instead of `C-x
  647. d'.
  648.  
  649. 
  650. File: emacs,  Node: Dired Commands,  Next: Dired Deletion,  Prev: Dired Enter,  Up: Dired
  651.  
  652. Commands in the Dired Buffer
  653. ============================
  654.  
  655.    The Dired buffer is "read-only", and inserting text in it is not
  656. useful, so ordinary printing characters such as `d' and `x' are used
  657. for special Dired commands.  Some Dired commands "mark" or "flag" the
  658. "current file" (that is, the file on the current line); other commands
  659. operate on the marked files or on the flagged files.
  660.  
  661.    All the usual Emacs cursor motion commands are available in Dired
  662. buffers.  Some special purpose cursor motion commands are also
  663. provided.  The keys `C-n' and `C-p' are redefined to put the cursor at
  664. the beginning of the file name on the line, rather than at the
  665. beginning of the line.
  666.  
  667.    For extra convenience, SPC and `n' in Dired are equivalent to `C-n'.
  668. `p' is equivalent to `C-p'.  (Moving by lines is so common in Dired
  669. that it deserves to be easy to type.)  DEL (move up and unflag) is
  670. often useful simply for moving up.
  671.  
  672. 
  673. File: emacs,  Node: Dired Deletion,  Next: Dired Visiting,  Prev: Dired Commands,  Up: Dired
  674.  
  675. Deleting Files with Dired
  676. =========================
  677.  
  678.    The primary use of Dired is to "flag" files for deletion and then
  679. delete the files previously flagged.
  680.  
  681. `d'
  682.      Flag this file for deletion.
  683.  
  684. `u'
  685.      Remove deletion flag on this line.
  686.  
  687. `DEL'
  688.      Move point to previous line and remove the deletion flag on that
  689.      line.
  690.  
  691. `x'
  692.      Delete the files that are flagged for deletion.
  693.  
  694. `#'
  695.      Flag all auto-save files (files whose names start and end with `#')
  696.      for deletion (*note Auto Save::.).
  697.  
  698. `~'
  699.      Flag all backup files (files whose names end with `~') for deletion
  700.      (*note Backup::.).
  701.  
  702. `. (Period)'
  703.      Flag excess numeric backup files for deletion.  The oldest and
  704.      newest few backup files of any one file are exempt; the middle
  705.      ones are flagged.
  706.  
  707. `% d REGEXP RET'
  708.      Flag for deletion all files whose names match the regular
  709.      expression REGEXP (`dired-flag-files-regexp').  This is just like
  710.      `% m' except that it uses `D' instead of `*' to mark the files.
  711.  
  712.      Only the non-directory part of the file name is used in matching.
  713.      Use `^' and `$' to anchor matches.  Exclude subdirectories by
  714.      hiding them (*note Hiding Subdirectories::.).
  715.  
  716.    You can flag a file for deletion by moving to the line describing the
  717. file and typing `d'.  The deletion flag is visible as a `D' at the
  718. beginning of the line.  This command moves point to the beginning of
  719. the next line, so that repeated `d' commands flag successive files.
  720.  
  721.    The files are flagged for deletion rather than deleted immediately to
  722. reduce the danger of deleting a file accidentally.  Until you direct
  723. Dired to expunge the flagged files, you can remove deletion flags using
  724. the commands `u' and DEL.  `u' works just like `d', but removes flags
  725. rather than making flags.  DEL moves upward, removing flags; it is like
  726. `u' with numeric argument automatically negated.
  727.  
  728.    To delete the flagged files, type `x' (`dired-expunge').  This
  729. command first displays a list of all the file names flagged for
  730. deletion, and requests confirmation with `yes'.  Once you confirm, `x'
  731. deletes all the flagged files, then deletes their lines from the text
  732. of the Dired buffer.  The shortened Dired buffer remains selected.
  733.  
  734.    If you answer `no' or quit with `C-g' when asked to confirm, you
  735. return immediately to Dired, with the deletion flags still present in
  736. the buffer, and no files actually deleted.
  737.  
  738.    The `#', `~' and `.' commands flag many files for deletion, based on
  739. their file names.  These commands are useful precisely because they do
  740. not actually delete any files; you can remove the deletion flags from
  741. any flagged files that you really wish to keep.
  742.  
  743.    `#' flags for deletion all files whose names look like auto-save
  744. files (*note Auto Save::.)--that is, files whose names begin and end
  745. with `#'.  `~' flags for deletion all files whose names say they are
  746. backup files (*note Backup::.)--that is, whose names end in `~'.
  747.  
  748.    `.' (Period) flags just some of the backup files for deletion: all
  749. but the oldest few and newest few backups of any one file.  Normally
  750. `dired-kept-versions' (*not* `kept-new-versions'; that applies only
  751. when saving) specifies the number of newest versions of each file to
  752. keep, and `kept-old-versions' specifies the number of oldest versions
  753. to keep.
  754.  
  755.    Period with a positive numeric argument, as in `C-u 3 .', specifies
  756. the number of newest versions to keep, overriding
  757. `dired-kept-versions'.  A negative numeric argument overrides
  758. `kept-old-versions', using minus the value of the argument to specify
  759. the number of oldest versions of each file to keep.
  760.  
  761.    The `% d' command flags all files whose names match a specified
  762. regular expression (`dired-flag-files-regexp').  Only the non-directory
  763. part of the file name is used in matching.  You can use `^' and `$' to
  764. anchor matches.  You can exclude subdirectories by hiding them (*note
  765. Hiding Subdirectories::.).
  766.  
  767. 
  768. File: emacs,  Node: Dired Visiting,  Next: Marks vs Flags,  Prev: Dired Deletion,  Up: Dired
  769.  
  770. Visiting Files in Dired
  771. =======================
  772.  
  773.    There are several Dired commands for visiting or examining the files
  774. listed in the Dired buffer.  All of them apply to the current line's
  775. file; if that file is really a directory, these commands invoke Dired on
  776. that subdirectory (using a separate Dired buffer).
  777.  
  778. `f'
  779.      Visit the file described on the current line, like typing `C-x C-f'
  780.      and supplying that file name (`dired-find-file').  *Note
  781.      Visiting::.
  782.  
  783. `o'
  784.      Like `f', but uses another window to display the file's buffer
  785.      (`dired-find-file-other-window').  The Dired buffer remains visible
  786.      in the first window.  This is like using `C-x 4 C-f' to visit the
  787.      file.  *Note Windows::.
  788.  
  789. `C-o'
  790.      Visit the file described on the current line, and display the
  791.      buffer in another window, but do not select that window
  792.      (`dired-display-file').
  793.  
  794. `v'
  795.      View the file described on the current line, using `M-x view-file'
  796.      (`dired-view-file').
  797.  
  798.      Viewing a file is like visiting it, but is slanted toward moving
  799.      around in the file conveniently and does not allow changing the
  800.      file.  *Note View File: Misc File Ops.
  801.  
  802. 
  803. File: emacs,  Node: Marks vs Flags,  Next: Operating on Files,  Prev: Dired Visiting,  Up: Dired
  804.  
  805. Dired Marks vs. Flags
  806. =====================
  807.  
  808.    Instead of flagging a file with `D', you can "mark" the file with
  809. some other character (usually `*').  Most Dired commands other than
  810. "expunge" (`x') operate on files marked with `*'.
  811.  
  812.    Here are some commands for marking with `*' (and also for
  813. unmarking).  (*Note Dired Deletion::, for commands to flag and unflag
  814. files.)
  815.  
  816. `m'
  817.      Mark the current file with `*' (`dired-mark').  With a numeric
  818.      argument N, mark the next N files starting with the current file.
  819.      (If N is negative, mark the previous -N files.)
  820.  
  821. `*'
  822.      Mark all executable files with `*' (`dired-mark-executables').
  823.      With a prefix argument, unmark all those files.
  824.  
  825. `@'
  826.      Mark all symbolic links with `*' (`dired-mark-symlinks').  With a
  827.      prefix argument, unmark all those files.
  828.  
  829. `/'
  830.      Mark with `*' all files which are actually directories, except for
  831.      `.' and `..' (`dired-mark-directories').  With a prefix argument,
  832.      unmark all those files.
  833.  
  834. `M-DEL MARKCHAR'
  835.      Remove all marks that use the character MARKCHAR
  836.      (`dired-unmark-all-files').  If you specify RET as MARKCHAR, this
  837.      command removes all marks, no matter what the marker character is.
  838.  
  839.      With a numeric argument, this command queries about each marked
  840.      file, asking whether to remove its mark.  You can answer `y'
  841.      meaning yes, `n' meaning no, `!' to remove the marks from the
  842.      remaining files without asking about them.
  843.  
  844. `c OLD NEW'
  845.      Replace all marks that use the character OLD with marks that use
  846.      the character NEW (`dired-change-marks').  This command is the
  847.      only way to create or use marks other than `*' or `D'.  The
  848.      arguments are single characters--do not use RET to terminate them.
  849.  
  850.      You can use almost any character as a mark character by means of
  851.      this command, to distinguish various classes of files.  If OLD is a
  852.      space (` '), then the command operates on all unmarked files; if
  853.      NEW is a space, then the command unmarks the files it acts on.
  854.  
  855.      To illustrate the power of this command, here is how to put `*'
  856.      marks on all the files that are unmarked, while unmarking all
  857.      those that have `*' marks:
  858.  
  859.           c * t  c SPC *  c t SPC
  860.  
  861. `% m REGEXP RET'
  862.      Mark (with `*') all files whose names match the regular expression
  863.      REGEXP (`dired-mark-files-regexp').
  864.  
  865.      Only the non-directory part of the file name is used in matching.
  866.      Use `^' and `$' to anchor matches.  Exclude subdirectories by
  867.      hiding them (*note Hiding Subdirectories::.).
  868.  
  869. 
  870. File: emacs,  Node: Operating on Files,  Next: Shell Commands in Dired,  Prev: Marks vs Flags,  Up: Dired
  871.  
  872. Operating on Files
  873. ==================
  874.  
  875.    This section describes the basic Dired commands to operate on one
  876. file or several files.  All of these commands are capital letters; all
  877. of them use the minibuffer, either to read an argument or to ask for
  878. confirmation, before they act.  All use the following convention to
  879. decide which files to manipulate:
  880.  
  881.    * If you give the command a numeric prefix argument N, it operates
  882.      on the next N files, starting with the current file.  (If N is
  883.      negative, the command operates on the -N files preceding the
  884.      current line.)
  885.  
  886.    * Otherwise, if some files are marked with `*', the command operates
  887.      on all those files.
  888.  
  889.    * Otherwise, the command operates on the current file only.
  890.  
  891.    Here are the commands that operate on files in this way:
  892.  
  893. `C NEW RET'
  894.      Copy the specified files (`dired-do-copy').  The argument NEW is
  895.      the directory to copy into, or (if copying a single file) the new
  896.      name.
  897.  
  898.      If `dired-copy-preserve-time' is non-`nil', then copying with this
  899.      command sets the modification time of the new file to be the same
  900.      as that of the old file.
  901.  
  902. `R NEW RET'
  903.      Rename the specified files (`dired-do-rename').  The argument NEW
  904.      is the directory to rename into, or (if renaming a single file)
  905.      the new name.
  906.  
  907.      Dired automatically changes the visited file name of buffers
  908.      associated with renamed files so that they refer to the new names.
  909.  
  910. `H NEW RET'
  911.      Make hard links to the specified files (`dired-do-hardlink').  The
  912.      argument NEW is the directory to make the links in, or (if making
  913.      just one link) the name to give the link.
  914.  
  915. `S NEW RET'
  916.      Make symbolic links to the specified files (`dired-do-symlink').
  917.      The argument NEW is the directory to make the links in, or (if
  918.      making just one link) the name to give the link.
  919.  
  920. `M MODESPEC RET'
  921.      Change the mode (also called "permission bits") of the specified
  922.      files (`dired-do-chmod').  This calls the `chmod' program, so
  923.      MODESPEC can be any argument that `chmod' can handle.
  924.  
  925. `G NEWGROUP RET'
  926.      Change the group of the specified files to NEWGROUP
  927.      (`dired-do-chgrp').
  928.  
  929. `O NEWOWNER RET'
  930.      Change the owner of the specified files to NEWOWNER
  931.      (`dired-do-chown').  (On most systems, only the superuser can do
  932.      this.)
  933.  
  934.      The variable `dired-chown-program' specifies the name of the
  935.      program to use to do the work (different systems put `chown' in
  936.      different places).
  937.  
  938. `P COMMAND RET'
  939.      Print the specified files (`dired-do-print').  You must specify the
  940.      command to print them with, but the minibuffer starts out with a
  941.      suitable guess made using the variables `lpr-command' and
  942.      `lpr-switches' (the same variables that `lpr-file' uses; *note
  943.      Hardcopy::.).
  944.  
  945. `Z'
  946.      Compress or uncompress the specified files (`dired-do-compress').
  947.      If the file appears to be a compressed file, it is uncompressed;
  948.      otherwise, it is compressed.
  949.  
  950. `L'
  951.      Load the specified Emacs Lisp files (`dired-do-load').  *Note Lisp
  952.      Libraries::.
  953.  
  954. `B'
  955.      Byte compile the specified Emacs Lisp files
  956.      (`dired-do-byte-compile').  *Note Byte Compilation: (elisp)Byte
  957.      Compilation.
  958.  
  959. 
  960. File: emacs,  Node: Shell Commands in Dired,  Next: Transforming File Names,  Prev: Operating on Files,  Up: Dired
  961.  
  962. Shell Commands in Dired
  963. =======================
  964.  
  965.    The dired command `!' (`dired-do-shell-command') reads a shell
  966. command string in the minibuffer and runs the shell command on all the
  967. specified files.  There are two ways of applying a shell command to
  968. multiple files:
  969.  
  970.    * If you use `*' in the shell command, then it runs just once, with
  971.      the list of file names substituted for the `*'.  The order of file
  972.      names is the order of appearance in the Dired buffer.
  973.  
  974.      Thus, `! tar cf foo.tar * RET' runs `tar' on the entire list of
  975.      file names, putting them into one tar file `foo.tar'.
  976.  
  977.    * If the command string doesn't contain `*', then it runs once *for
  978.      each file*, with the file name added at the end.
  979.  
  980.      For example, `! uudecode RET' runs `uudecode' on each file.
  981.  
  982.    What if you want to run the shell command once for each file but with
  983. the file name inserted in the middle?  Or if you want to use the file
  984. names in a more complicated fashion?  Use a shell loop.  For example,
  985. this shell command would run `uuencode' on each of the specified files,
  986. writing the output into a corresponding `.uu' file:
  987.  
  988.      for file in *; uuencode $file $file >$file.uu; done
  989.  
  990.    The working directory for the shell command is the top level
  991. directory of the Dired buffer.
  992.  
  993.    The `!' command does not attempt to update the Dired buffer to show
  994. new or modified files, because it doesn't really understand shell
  995. commands, and does not know what files the shell command changed.  Use
  996. the `g' command to update the Dired buffer (*note Dired Updating::.).
  997.  
  998. 
  999. File: emacs,  Node: Transforming File Names,  Next: Comparison in Dired,  Prev: Shell Commands in Dired,  Up: Dired
  1000.  
  1001. Transforming File Names in Dired
  1002. ================================
  1003.  
  1004.    Here are commands that alter file names in a systematic way:
  1005.  
  1006. `% u'
  1007.      Rename each of the selected files to an upper case name
  1008.      (`dired-upcase').  If the old file names are `Foo' and `bar', the
  1009.      new names are `FOO' and `BAR'.
  1010.  
  1011. `% l'
  1012.      Rename each of the selected files to a lower case name
  1013.      (`dired-downcase').  If the old file names are `Foo' and `bar',
  1014.      the new names are `foo' and `bar'.
  1015.  
  1016. `% R FROM RET TO RET'
  1017. `% C FROM RET TO RET'
  1018. `% H FROM RET TO RET'
  1019. `% S FROM RET TO RET'
  1020.      These four commands rename, copy, make hard links and make soft
  1021.      links, in each case computing the new name by regular expression
  1022.      substitution from the name of the old file.
  1023.  
  1024.    The four regular expression substitution commands effectively perform
  1025. `query-replace-regexp' on the selected file names in the Dired buffer.
  1026. They read two arguments: a regular expression FROM, and a substitution
  1027. pattern TO.
  1028.  
  1029.    The commands match each "old" file name against the regular
  1030. expression FROM, and then replace the matching part with TO.  You can
  1031. use `\&' and `\DIGIT' in TO to refer to all or part of the old file
  1032. name, as in `query-replace' (*note Query Replace::.).
  1033.  
  1034.    For example, `% R ^.*$ RET x-\& RET' renames each selected file by
  1035. prepending `x-' to its name.  The inverse of this, removing `x-' from
  1036. the front of each file name, is also possible: one method is `% R
  1037. ^x-.*$ RET \& RET'; another is `% R ^x- RET RET'.  (Use `^' and `$' to
  1038. anchor matches that should span the whole filename.)
  1039.  
  1040.    If the regular expression matches more than once in a file name, only
  1041. the first match is replaced.
  1042.  
  1043.    Normally, the replacement process does not consider the files'
  1044. directory names; it operates on the file name within the directory.  If
  1045. you specify a prefix argument of zero, then replacement affects the
  1046. entire absolute file name including directory name.
  1047.  
  1048.    Often you will want to apply the command to all files matching the
  1049. same REGEXP that you use in the command.  To do this, mark those files
  1050. with `% m REGEXP RET', then use the same regular expression in the
  1051. command to operate on the files.  To make this easier, the commands to
  1052. operate use the last regular expression specified in a `%' command as a
  1053. default.
  1054.  
  1055. 
  1056. File: emacs,  Node: Comparison in Dired,  Next: Subdirectories in Dired,  Prev: Transforming File Names,  Up: Dired
  1057.  
  1058. File Comparison with Dired
  1059. ==========================
  1060.  
  1061.    Here are two Dired commands that compare specified files using
  1062. `diff'.
  1063.  
  1064. `='
  1065.      Compare the current file (the file at point) with another file
  1066.      (the file at the mark) using the `diff' program (`dired-diff').
  1067.      The file at the mark is the first argument of `diff', and the file
  1068.      at point is the second argument.
  1069.  
  1070. `M-='
  1071.      Compare the current file with its latest backup file
  1072.      (`dired-backup-diff').  If the current file is itself a backup,
  1073.      compare it with the file it is a backup of; this way, you can
  1074.      compare a file with any backup version of your choice.
  1075.  
  1076.      The backup file is the first file given to `diff'.
  1077.  
  1078. 
  1079. File: emacs,  Node: Subdirectories in Dired,  Next: Subdirectory Motion,  Prev: Comparison in Dired,  Up: Dired
  1080.  
  1081. Subdirectories in Dired
  1082. =======================
  1083.  
  1084.    A Dired buffer displays just one directory in the normal case; but
  1085. you can optionally include its subdirectories as well.
  1086.  
  1087.    The simplest way to include multiple directories in one Dired buffer
  1088. is to specify the options `-lR' for running `ls'.  (If you give a
  1089. numeric argument when you run Dired, then you can specify these options
  1090. in the minibuffer.)  That produces a recursive directory listing showing
  1091. all subdirectories at all levels.
  1092.  
  1093.    But usually all the subdirectories are too many; usually you will
  1094. prefer to include specific subdirectories only.  You can do this with
  1095. the `i' command:
  1096.  
  1097. `i'
  1098.      Insert the contents of a subdirectory later in the buffer.
  1099.  
  1100.      Use the `i' (`dired-maybe-insert-subdir') command on a line that
  1101.      describes a file which is a directory.  It inserts the contents of
  1102.      that directory into the same Dired buffer, and moves there.
  1103.      Inserted subdirectory contents follow the top-level directory of
  1104.      the Dired buffer, just as they do in `ls -lR' output.
  1105.  
  1106.      If the subdirectory's contents are already present in the buffer,
  1107.      the `i' command just moves to it.
  1108.  
  1109.      In either case, `i' sets the Emacs mark before moving, so `C-x
  1110.      C-x' takes you back to the old position in the buffer (the line
  1111.      describing that subdirectory).
  1112.  
  1113.      Use the `l' command (`dired-do-redisplay') to update the
  1114.      subdirectory's contents.  Use `k' to delete the subdirectory.
  1115.      *Note Dired Updating::.
  1116.  
  1117. 
  1118. File: emacs,  Node: Subdirectory Motion,  Next: Hiding Subdirectories,  Prev: Subdirectories in Dired,  Up: Dired
  1119.  
  1120. Moving Over Subdirectories
  1121. ==========================
  1122.  
  1123.    When a Dired buffer lists subdirectories, you can use the page motion
  1124. commands `C-x [' and `C-x ]' to move by entire directories.
  1125.  
  1126.    The following commands move across, up and down in the tree of
  1127. directories within one Dired buffer.  They move to "directory header
  1128. lines", which are the lines that give a directory's name, at the
  1129. beginning of the directory's contents.
  1130.  
  1131. `C-M-n'
  1132.      Go to next subdirectory header line, regardless of level
  1133.      (`dired-next-subdir').
  1134.  
  1135. `C-M-p'
  1136.      Go to previous subdirectory header line, regardless of level
  1137.      (`dired-prev-subdir').
  1138.  
  1139. `C-M-u'
  1140.      Go up to the parent directory's header line (`dired-tree-up').
  1141.  
  1142. `C-M-d'
  1143.      Go down in the directory tree, to the first subdirectory's header
  1144.      line (`dired-tree-down').
  1145.  
  1146. 
  1147. File: emacs,  Node: Hiding Subdirectories,  Next: Dired Updating,  Prev: Subdirectory Motion,  Up: Dired
  1148.  
  1149. Hiding Subdirectories
  1150. =====================
  1151.  
  1152.    "Hiding" a subdirectory means to make it invisible, except for its
  1153. header line, via selective display (*note Selective Display::.).
  1154.  
  1155. `$'
  1156.      Hide or reveal the subdirectory that point is in, and move point
  1157.      to the next subdirectory (`dired-hide-subdir').  A numeric
  1158.      argument serves as a repeat count.
  1159.  
  1160. `M-$'
  1161.      Hide all subdirectories in this Dired buffer, leaving only their
  1162.      header lines (`dired-hide-all').  Or, if any subdirectory is
  1163.      currently hidden, make all subdirectories visible again.  You can
  1164.      use this command to get an overview in very deep directory trees
  1165.      or to move quickly to subdirectories far away.
  1166.  
  1167.    Ordinary Dired commands never consider files inside a hidden
  1168. subdirectory.  For example, the commands to operate on marked files
  1169. ignore files in hidden directories even if they are marked.  Thus you
  1170. can use hiding to temporarily exclude subdirectories from operations
  1171. without having to remove the markers.
  1172.  
  1173.    The subdirectory hiding commands toggle; that is they unhide what was
  1174. hidden and vice versa.
  1175.  
  1176.